import { FormItem } from "@/components/SearchForm/formTypes";
import { RATE_LIST } from "@/constants";

export const getModalFields = (): FormItem[] => [
  {
    type: "Switch",
    formItemProps: {
      name: "state",
      label: "任务状态",
      valuePropName: "checked",
      initialValue: true,
    },
  },
  {
    type: "Select",
    formItemProps: {
      name: "rate",
      label: "上报间隔单位",
    },
    props: {
      options: RATE_LIST,
    },
  },
  {
    type: "InputNumber",
    formItemProps: {
      name: "cycle",
      label: "上报间隔",
      initialValue: 1,
      rules: [{ required: true }],
    },
    props: {
      min: 1,
    },
  },
];
